<?php
/*
 供channel_show中的ajax使用,用于获取子栏目的id
*/
header("Content-type: text/html; charset=utf-8");
require_once ('config.php');
require_once (WEBURL.'/include/conn.php');
require_once (WEBURL.'/login_status_check.php');
if(!checkLogin()){
	echo "登录超时，请重新登录!";
	return;
}
 if(empty($_GET['pre_id'])){
 	echo "forbidden";
	return;
}
$result=array();
$i=0;
$pre_id=$_GET['pre_id'];
$sql_get_child_channel_id="select channel_id from channel where pre_id='$pre_id'";
$result_get_child_channel_id=mysql_query($sql_get_child_channel_id);
if(!$result_get_child_channel_id){
	return;
}
$row_number=mysql_num_rows($result_get_child_channel_id);
 if($row_number!=0){
	while($row_get_child_channel_id=mysql_fetch_row($result_get_child_channel_id)){
		$result[$i++]=$row_get_child_channel_id[0];
	}
	echo join("|", $result);
}else{
	echo "";
}